import 'package:flutter/material.dart';
import 'package:wanchong/app/im/city.dart';
import 'package:wanchong/app/im/home.dart';
import 'package:wanchong/app/knowledge/answerselct.dart';
// import 'package:wanchong/app/knowledge/home.dart';
import 'package:wanchong/app/means.dart';
import 'package:wanchong/app/mecollect/webviews.dart';
import 'package:wanchong/app/pet/add.dart';
import 'package:wanchong/app/qrscan.dart';
import 'package:wanchong/app/setting/about.dart';
import 'package:wanchong/app/setting/home.dart';
import 'package:wanchong/app/signin/rank.dart';
import 'package:wanchong/app/store/search.dart';
import 'package:wanchong/app/user/call.dart';
import 'package:wanchong/path.dart';
import 'package:wanchong/app/knowledge/videoselect.dart';

import 'package:wanchong/app/home.dart';
import 'package:wanchong/app/setpwd.dart';
import 'package:wanchong/app/splash.dart';
import 'package:wanchong/app/login.dart';
import 'package:wanchong/app/plogin.dart';
import 'package:wanchong/app/check.dart';
import 'app/knowledge/knowzselect.dart';
import 'app/knowledge/infosearch.dart';
import 'package:wanchong/app/mecollect/mecollect.dart';


import 'app/mecollect/vid.dart';
import 'app/mecollect/webviewz.dart';
import 'app/merelease/release.dart';
import 'app/perinfor/addloc.dart';
import 'app/perinfor/menews.dart';
import 'app/perinfor/modifyloc.dart';

import 'app/perinfor/petdevice.dart';
import 'app/setting/feed_back.dart';
import 'app/signin/signin.dart';

class Router {
  static Map<String, WidgetBuilder> routers;
  static initRouters() {
    routers = {
      SplashPath: (context) => Splash(),
      HomePath: (context) => Home(),
      LoginPath: (context) => Login(),
      CheckPath: (context) => Check(),
      SetPwdPath: (context) => SetPwd(),
      MeansPath: (context) => Means(),
      AddPetPath: (context) => AddPet(),
      SettingHomePath: (context) => SettingHome(),
      AboutPath: (context) => About(),
      FeedBackPath: (context) => FeedBack(),
      UserInfoPath: (context) => UserInfo(),
      AddLocPath: (context) => AddLoc(),
      ModifylocPath: (context) => ModifyLoc(),
      // PetInfoPath:(context) => PetInfo(),

      CallPath: (context) => Call(),
      // KonwLedgePath: (context) => KnowLedge()
      petdevicePath: (context) => PetDevice(),
      mecollectPath: (context) => MeCollect(),
      signinPath: (context) => SignIn(),
      CallPath: (context) => Call(),
      ReleasePath: (context) => Release(),
      VebviewsPath: (context) => Webviews(),
      WebviewzPath: (context) => Webviewz(),
      QRSacnPath: (context) => QrScan(),
      KnowzselectPath: (context) => Knowzselect(),
      AnswerselctPath: (context) => Answerselct(),
      SearchPath: (context) => Search(),
      RankPath: (context) => Rank(),
      PloginPath: (context) => Plogin(),
      InfosearchPath: (context) => Infosearch(),
      VideoselectPath: (context) => Videoselect(),
      VidPath: (context) => Vid(),
      ImHomePath: (context) => ImHome(),
      ImCityPath: (context) => ImCity()
    };
    return routers;
  }

  static SlideTransition createTransition(
      Animation<double> animation, Widget child) {
    return new SlideTransition(
      position: new Tween<Offset>(
        begin: const Offset(1.0, 0.0),
        end: const Offset(0.0, 0.0),
      ).animate(animation),
      child: child,
    );
  }
}
